<?php

class Application_Form_Departament extends Zend_Form {

    public $opciones;

    public function __construct($options = null) {
        parent::__construct($options);

        $this->setName('Nou dept');

        $nom = new Zend_Form_Element_Text('nom');
        $nom->setLabel('Nom')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addErrorMessage("Camp obligatori!");
        $dscp = new Zend_Form_Element_Text('descripcio');
        $dscp->setLabel('Descripcio')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addErrorMessage("Camp obligatori!");

        $submit = new Zend_Form_Element_Submit("submit");
        $submit->setLabel("Guardar");
        $submit->setAttrib('class', 'btn-success');

        $this->addElements(array($nom, $dscp,$submit));
    }

}

